package com.gxlu.ms.base.result;

/**
 * 错误码 Enum
 * @author andy.lhc
 */
public enum CommonResultCode  {

    SUCCESS(1, "success","成功"),
    FAILED(0, "failed","失败"),
    EXCEPTION(10, "exception","失败"),
    UNKNOWN_ERROR(12, "unknown error","未知错误"),
    ARGUMENT_ERROR(13, "argument invalid","参数非法"),
    UNAUTHORIZED(14, "unauthorized","请求访问受限"),
    TIMEOUT(15, "timeout","访问超时"),
    FASTVALIDATOR_ERROR(16, "fastvalidator check error","校验错误"),
    USER_SESSION_EXPIRED(17, "user session expired","用户会话已过期,请重新登录或刷新页面"),
    SYSTEM_ERROR(500, "system_error","系统错误") ;

    private int code;
    private String msg;
    private String desc ;

    CommonResultCode(int code, String msg, String desc) {
        this.code = code;
        this.msg = msg;
        this.desc = desc ;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getDesc() {
        return desc;
    }
}
